package jp.co.axisware.taskboard.client.managed.ui;

import com.google.gwt.requestfactory.ui.client.ProxyRenderer;
import java.util.Set;
import jp.co.axisware.taskboard.client.managed.request.ApplicationUserProxy;
import jp.co.axisware.taskboard.client.managed.request.ProjectProxy;

public class ApplicationUserProxyRenderer extends ProxyRenderer<ApplicationUserProxy> {

    private static jp.co.axisware.taskboard.client.managed.ui.ApplicationUserProxyRenderer INSTANCE;

    protected ApplicationUserProxyRenderer() {
        super(new String[] { "use" });
    }

    public static jp.co.axisware.taskboard.client.managed.ui.ApplicationUserProxyRenderer instance() {
        if (INSTANCE == null) {
            INSTANCE = new ApplicationUserProxyRenderer();
        }
        return INSTANCE;
    }

    public String render(ApplicationUserProxy object) {
        if (object == null) {
            return "";
        }
        return object.getUse() + " (" + object.getId() + ")";
    }
}
